package isquirrel.beans;

import isquirrel.util.HibernateUtil;

import org.junit.Test;

public class LogTest {

	@Test
	public void testSaveLog() {
		HibernateUtil.useTestDB();
		HibernateUtil.beginTransaction();
		
		Log log = new Log();
		log.setUserID(Long.valueOf(1));
		log.setFriends(Long.valueOf(10));
		log.setInterests(Long.valueOf(2));
		log.setLiked(Long.valueOf(5));
		log.setUsers(Long.valueOf(20));
		
		HibernateUtil.getSession().save(log);
		
		log = new Log();
		log.setUserID(Long.valueOf(2));
		log.setFriends(Long.valueOf(5));
		log.setInterests(Long.valueOf(20));
		log.setLiked(Long.valueOf(3));
		log.setUsers(Long.valueOf(15));
		
		HibernateUtil.getSession().save(log);
		
		HibernateUtil.commit();
	}

}
